package com.zmj.common.http;

import com.github.lianjiatech.retrofit.spring.boot.annotation.RetrofitClient;
import com.zmj.dto.rsp.MailChimpCampaignRsp;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.QueryMap;

import java.util.Map;

/**
 * retrofit2 调用测试
 *
 * @author zmj
 * @date 2021-09-02 17:38
 */
@RetrofitClient(baseUrl = "https://us10.api.mailchimp.com/3.0/")
public interface TestApi {

    @GET("reports")
    @Headers({"user-agent:PostmanRuntime/7.26.3:application/json"})
    MailChimpCampaignRsp reports(@Header("Authorization") String authorization,
                                 @QueryMap(encoded = true) Map<String, Object> map);
}
